package com.iscas.imchat.utils;

import com.iscas.imchat.utils.Util;

import java.util.HashMap;
import java.util.List;

public class UtilTest {
    public static void main(String[] args) {

        //构造方法
        Util util=new Util("postgres","980602",
                "127.0.0.1","accountsystem","5432");

        //插入语法
//        Boolean insert = util.Insert(" insert into account (UID,pw) values ('42100', 'ASO2E2W'); ");


        //删除
//        util.Delete("delete from account t where t.pw='1212' ");


        //更新
//        util.Update("update account set pw = '1000' where uid = 'as' ");


        //查询
        List<HashMap<String, Object>> select = util.Select("select * from account ");

        //关流
        util.close();

        //打印
        System.out.println(select);
    }
}
